package jh.com.jhappbf.usermanager;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;

import androidx.fragment.app.Fragment;
import jh.com.jhappbf.R;

/**
 * @author Administrator
 */
public class UserManagerMain extends Fragment implements OnClickListener {
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View v = inflater.inflate(R.layout.user_manager_main_activity, null);
        initView(v);
        return v;
    }

    /**
     * 初始化
     */
    private void initView(View v) {
        RelativeLayout mUserManagerLayout = v.findViewById(R.id.user_manager_layout);
        TextView mTxtUserManager = v.findViewById(R.id.user_manager_txt);
        mUserManagerLayout.setOnClickListener(this);
        mTxtUserManager.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.user_manager_layout:
            case R.id.user_manager_txt:
                Intent i = new Intent(getActivity(), UserManagerQuery.class);
                startActivity(i);
                break;
            default:
                break;
        }
    }
}
